home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 013 / cleanup.arc / CLEANUP.BAS next >
Encoding:
BASIC Source File  |  1988-01-19  |  2.3 KB  |  86 lines

  1. ' *********************************************************************
  2. ' * cleanup.bas formatted from dmanager.bas
  3. ' * January 14, 1988 at  11:56 pm.  Formatted by QBF (C)opyright 1988.
  4. ' * QBF is available from Inventories Unlimited, USA, (215) 922-2557.
  5. ' *********************************************************************
  6.  
  7. '$INCLUDE: 'qbtools2.inc'
  8.    '
  9.    '  Directory Manager
  10.    '     (c) Copyright, 1988 Roy Barrow, QBTOOLS/2 Author
  11.    '     Source code is distributed. Basically unusable without QBTOOLS/2
  12.    '     QBTOOLS/2 is available from:
  13.    '
  14.    '        Inventories Unlimited Inc.
  15.    '        222 Church Street
  16.    '        Philadelphia, PA 19106-2251
  17.    '        215-922-2557 (Voice)
  18.    '        215-627-3910 (Data)
  19.    
  20.    DIM Dirs$(250)  '  Allow 250 directories
  21.    
  22.    PRINT "  Dir Cleanup (c) Copyright Roy Barrow 1988."
  23.    PRINT "  Uses portions of QBTOOLS/2"
  24.    PRINT
  25.    
  26.    PRINT "Reading directories ....";
  27.    GetDirectories Dirs$(), Dcount%
  28.    PRINT " done."
  29.    
  30.    IF Dcount% < 0 THEN
  31.       PRINT "There are TOO many directories to manage properly."
  32.       PRINT "Acquire QBTOOLS/2 and INCREASE the DIM Dirs$() statement."
  33.       END
  34.    END IF
  35.    
  36.    PRINT "Sorting directories ....";
  37.    QuickSort Dirs$(), Dcount%
  38.    PRINT " done."
  39.    
  40.    PRINT "Cleaning Directories."
  41.    
  42.    DDel% = 0
  43.    
  44.    FOR j% = Dcount% TO 1 STEP -1
  45.       DDir$ = Dirs$(j%)
  46.       Trim DDir$
  47.       TestDel% = SubDirRemove%(DDir$)
  48.       IF TestDel% = 0 THEN
  49.          PRINT " "; DDir$; " empty, was deleted."
  50.          DDel% = DDel% + 1
  51.       END IF
  52.    NEXT j%
  53.    
  54.    IF DDel% <> 0 THEN
  55.       PRINT DDel%;
  56.    ELSE
  57.       PRINT "No ";
  58.    END IF
  59.    
  60.    PRINT "empty ";
  61.    
  62.    IF DDel% = 1 THEN
  63.       PRINT "sub-directory ";
  64.    ELSE
  65.       PRINT "sub-directories ";
  66.    END IF
  67.    
  68.    PRINT "deleted."
  69.    
  70.    
  71.    END
  72.    
  73.    
  74.    
  75.    
  76.    
  77.  
  78. ' *********************************************************************
  79. ' * cleanup.bas formatted from dmanager.bas
  80. ' * January 14, 1988 at  11:56 pm.  Formatted by QBF (C)opyright 1988.
  81. ' * QBF is available from Inventories Unlimited, USA, (215) 922-2557.
  82. ' * Longest lines: 73(12), 71(33), 64(32), 57(11), 55(23).
  83. ' * Total lines = 85.  Maximum indentation depth = 3.
  84. ' *********************************************************************
  85.  
  86.